// 数据库连接池配置（网页7复用连接池逻辑）
const mysql = require('mysql2');

const pool = mysql.createPool({
  host: 'localhost',
  user: 'root',
  password: 'root',
  database: 'my_database',
  port: 3306,
  waitForConnections: true,
  connectionLimit: 10
});

module.exports = pool.promise(); // 导出Promise接口